import React, { Suspense } from 'react';
import "antd/dist/antd.less";
import { BrowserRouter as Router } from 'react-router-dom';
import { renderRoutes } from 'react-router-config';
import Lazy from '@/components/lazy';
import routes from './router';

function App() {
  return (
    <>
        <Suspense maxDuration={1000} fallback={<Lazy />}>
          <Router>
              {renderRoutes(routes)}
          </Router>
        </Suspense>
    </>
  );
}

export default App;
